// layout组件相关配置仓库
import { SET_DATA, GET_DATA } from '@/utils/localstorage';

import { defineStore } from 'pinia';
import type { SettingState } from './types/type';

let useLayOutSettingStore = defineStore('SettingStore', {
  state: (): SettingState => {
    return {
      fold: GET_DATA('FOLD'),
      refresh: false,
    };
  },
  actions: {
    changeFold() {
      this.fold = !this.fold;
      SET_DATA('FOLD', this.fold);
    },
  },
});

export default useLayOutSettingStore;
